/*
 * @Author: 大司马
 * @Date: 2021-01-05 10:05:11
 * @LastEditors: 大司马
 * @LastEditTime: 2021-02-03 14:18:33
 * @FilePath: \open-platform-ui\platform-pc-console\src\api\mq-service.js
 */
import axios from '@/libs/api.request'
import platform from '@/config/platform'

// 查询
export const getPages = params => {
  return axios.request({
    url: platform.MSGS + '/content/view',
    method: 'get',
    params
  })
}

// 获取消息类型
export const getLetterType1 = () => {
  return axios.request({
    url: platform.COMMON + '/enumeration/msgs/405',
    method: 'get'
  })
}

// 获取消息类型
export const getLetterType2 = () => {
  return axios.request({
    url: platform.COMMON + '/enumeration/msgs/13',
    method: 'get'
  })
}

// 删除
export const delByIds = data => {
  return axios.request({
    url: platform.MSGS + '/content/is-delete',
    method: 'post',
    data
  })
}

//  标记单个 已读
export const markSingle = data => {
  return axios.request({
    url: platform.MSGS + '/content/modify',
    method: 'post',
    data
  })
}

// 标记全部 已读
export const markAll = data => {
  return axios.request({
    url: platform.MSGS + '/content/modify/all',
    method: 'post',
    data
  })
}

// // 根据消息类型查询

// export const selectByType = params => {
// return axios.request({
//     // url: platform.MSGS + '/content/page',
//     url:platform.MSGS +  "/content/view",
//     method: 'get',
//     params
// })
// }

// .统计已读未读数量
export const getNums = params => {
  return axios.request({
    url: platform.MSGS + '/customer/read',
    method: 'get',
    params
  })
}
